/*
 * Copyright (c) 2006-2020, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-07-05     wcc       the first version
 * 2020-12-19     wat       modify for ART-PI smart weather report
 */
#ifndef APPLICATIONS_USR_NCOV_H_
#define APPLICATIONS_USR_NCOV_H_


#include <webclient.h>
#include <rtdevice.h>
#include <rtthread.h>
#include <cJSON.h>

#define API_NCOV     "https://view.inews.qq.com/g2/getOnsInfo?name=disease_h5"


struct NCOV_DATA{
    int  currentConfirmedCount;
    int  currentHeal;
    int  currentDead;
    int  currentImportCase;
    char updateTime[20];
};

struct TIME_DATA
{
    char current_date[20];
    char hstr[3];
    char mstr[3];
};


extern struct NCOV_DATA dataChinaNow;
extern struct NCOV_DATA dataChinaAdd;

extern struct TIME_DATA curTime;

int get_NCOV_Data(void);
int parseData(uint8_t *str);


#endif /* APPLICATIONS_USR_NCOV_H_ */
